/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticks.chromedome;

/**
 *
 * @author Jared
 */
public class Functions {
    
    /**
     *Useful STATIC method for conversions(esp. automode!)
     * @param array
     * Array to be converted to an int
     * @return
     */
    public static int booleanArrayToInt(boolean[] array)
  {
    int result = 0;
    for (int i = 0; i < array.length; i++)
    {
      int value = (array[i] ? 1 : 0) << i;
      result = result | value;
    }

    return result;
  }
    
}
